<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BrokenIRC: server_src/server_init.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BrokenIRC
   &#160;<span id="projectnumber">0.0.42</span>
   </div>
   <div id="projectbrief">A &#39;not so functionnal&#39; irc server and a WIP client</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_20e5c1c74b8b955148e6b35ac4a0bc4d.html">server_src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">server_init.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="server__init_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">** EPITECH PROJECT, 2018</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">** MY_IRC</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">** File description:</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">** Server listening socket and interface init</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;../include/server.h&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;unistd.h&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;fcntl.h&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;sys/types.h&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="server_8h.html#aa9bc3ff8e7f409540f85b3cc97636500">   18</a></span>&#160;<span class="keywordtype">int</span>     <a class="code" href="server__init_8c.html#aa9bc3ff8e7f409540f85b3cc97636500">set_clifd</a>(<span class="keywordtype">int</span> clisock, <span class="keywordtype">int</span> epollfd, <span class="keyword">struct</span> epoll_event *ev)</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;{</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <span class="keywordtype">int</span> rt = 0;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        <span class="keywordtype">int</span> op = EPOLL_CTL_ADD;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        ev-&gt;events = EPOLLIN | EPOLLET;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;        ev-&gt;data.fd = clisock;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        <span class="keywordflow">if</span> (epoll_ctl(epollfd, op, clisock, ev) == -1) {</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;                perror(<span class="stringliteral">&quot;set_clifd: epoll_ctl:&quot;</span>);</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;                rt = 84;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        }</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        fprintf(stderr, <span class="stringliteral">&quot;Add client n°[%d] to epoll interest list\n&quot;</span>, clisock);</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keywordflow">return</span> (rt);</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;}</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="server_8h.html#a3802a71fa34e93cb1d85f919914f5abf">   34</a></span>&#160;<span class="keywordtype">int</span>     <a class="code" href="server__init_8c.html#a3802a71fa34e93cb1d85f919914f5abf">set_iface</a>(<a class="code" href="server_8h.html#aa62dc6ab378205892df275c6df156dba">adrinf</a> *hints, <a class="code" href="server_8h.html#aa62dc6ab378205892df275c6df156dba">adrinf</a> **res, <span class="keyword">const</span> <span class="keywordtype">char</span> *port)</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordtype">int</span> rt = 0;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        memset(hints, 0, <span class="keyword">sizeof</span>(<span class="keyword">struct</span> addrinfo));</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        hints-&gt;ai_family = AF_UNSPEC;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        hints-&gt;ai_socktype = SOCK_STREAM;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        hints-&gt;ai_flags = AI_PASSIVE;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        hints-&gt;ai_protocol = IPPROTO_TCP;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        hints-&gt;ai_canonname = NULL;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        hints-&gt;ai_addr = NULL;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        hints-&gt;ai_next = NULL;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordflow">if</span> ((getaddrinfo(NULL, port, hints, res))) {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                perror(<span class="stringliteral">&quot;set_iface: getaddrinfo&quot;</span>);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                rt = 84;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        }</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="keywordflow">return</span> (rt);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;}</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="server_8h.html#a5cb15d408ef32c09c2485937503438ed">   59</a></span>&#160;<span class="keywordtype">int</span>     <a class="code" href="server__init_8c.html#a5cb15d408ef32c09c2485937503438ed">set_epoll</a>(<a class="code" href="structt__serv.html">t_serv</a> *all)</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;{</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keywordtype">int</span> rt = 0;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        all-&gt;<a class="code" href="structt__serv.html#a46bee037324e9deec26f15fbc4f6d8e5">epollfd</a> = epoll_create(10);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        memset(&amp;all-&gt;<a class="code" href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">ev</a>, 0, <span class="keyword">sizeof</span>(all-&gt;<a class="code" href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">ev</a>));</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <span class="keywordflow">if</span> (all-&gt;<a class="code" href="structt__serv.html#a46bee037324e9deec26f15fbc4f6d8e5">epollfd</a> == -1) {</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;                perror(<span class="stringliteral">&quot;set_epoll: epoll_create1&quot;</span>);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;                rt = 84;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                all-&gt;<a class="code" href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">ev</a>.events = EPOLLIN;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                all-&gt;<a class="code" href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">ev</a>.data.fd = all-&gt;<a class="code" href="structt__serv.html#ac9f24d41d8822f2c1b7df4362e18cad9">listen_sock</a>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                rt = epoll_ctl(all-&gt;<a class="code" href="structt__serv.html#a46bee037324e9deec26f15fbc4f6d8e5">epollfd</a>, EPOLL_CTL_ADD, all-&gt;<a class="code" href="structt__serv.html#ac9f24d41d8822f2c1b7df4362e18cad9">listen_sock</a>,</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                        &amp;all-&gt;<a class="code" href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">ev</a>);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;                <span class="keywordflow">if</span> (rt == -1) {</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                        perror(<span class="stringliteral">&quot;set_epoll: epoll_ctl&quot;</span>);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                        rt = 84;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                }</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        }</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordflow">return</span> (rt);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;}</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="server__init_8c.html#a381b88f843ed1ebdaa5b2a8ded74931b">   82</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span>     <a class="code" href="server__init_8c.html#a381b88f843ed1ebdaa5b2a8ded74931b">prevent_reused</a>(<span class="keywordtype">int</span> sockfd)</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;{</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="keywordtype">int</span> yes = 1;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordflow">if</span> (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (<span class="keyword">const</span> <span class="keywordtype">void</span> *)&amp;yes,</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>)) == -1) {</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                perror(<span class="stringliteral">&quot;prevent_reused: setsockopt&quot;</span>);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                exit(84);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        }</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;}</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="server_8h.html#a1f61d16ccfab82b21ca40ce23feb7c02">  100</a></span>&#160;<span class="keywordtype">int</span>     <a class="code" href="server__init_8c.html#a1f61d16ccfab82b21ca40ce23feb7c02">set_sockfd</a>(<a class="code" href="structt__serv.html">t_serv</a> *all)</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;{</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordtype">int</span> sfd = -1;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordflow">for</span> (all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a> = all-&gt;<a class="code" href="structt__serv.html#ae8783e38ef0c183366703267ca7b3298">res</a>; all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a> != NULL; all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a> = all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_next) {</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;                sfd = socket(all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_family, all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_socktype,</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                        all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_protocol);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                <a class="code" href="server__init_8c.html#a381b88f843ed1ebdaa5b2a8ded74931b">prevent_reused</a>(sfd);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;                <span class="keywordflow">if</span> (sfd == -1) {</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                        <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;                }</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;                <span class="keywordflow">if</span> (bind(sfd, all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_addr, all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_addrlen) == 0) {</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                }</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                close(sfd);</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        }</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keywordflow">if</span> (all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a> == NULL) {</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                fprintf(stderr, <span class="stringliteral">&quot;Could not bind\n&quot;</span>);</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((listen(sfd, <a class="code" href="server_8h.html#aeefbbafa97642defe3ee6c3080b7d66f">BACKLOG</a>) == -1)) {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                perror(<span class="stringliteral">&quot;listen: set_sockfd&quot;</span>);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        }</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keywordflow">return</span> (sfd);</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;}</div><div class="ttc" id="server_8h_html_aa62dc6ab378205892df275c6df156dba"><div class="ttname"><a href="server_8h.html#aa62dc6ab378205892df275c6df156dba">adrinf</a></div><div class="ttdeci">struct addrinfo adrinf</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00082">server.h:82</a></div></div>
<div class="ttc" id="structt__serv_html_ac9f24d41d8822f2c1b7df4362e18cad9"><div class="ttname"><a href="structt__serv.html#ac9f24d41d8822f2c1b7df4362e18cad9">t_serv::listen_sock</a></div><div class="ttdeci">int listen_sock</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00089">server.h:89</a></div></div>
<div class="ttc" id="structt__serv_html_a46bee037324e9deec26f15fbc4f6d8e5"><div class="ttname"><a href="structt__serv.html#a46bee037324e9deec26f15fbc4f6d8e5">t_serv::epollfd</a></div><div class="ttdeci">int epollfd</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00087">server.h:87</a></div></div>
<div class="ttc" id="server__init_8c_html_a5cb15d408ef32c09c2485937503438ed"><div class="ttname"><a href="server__init_8c.html#a5cb15d408ef32c09c2485937503438ed">set_epoll</a></div><div class="ttdeci">int set_epoll(t_serv *all)</div><div class="ttdef"><b>Definition:</b> <a href="server__init_8c_source.html#l00059">server_init.c:59</a></div></div>
<div class="ttc" id="server__init_8c_html_aa9bc3ff8e7f409540f85b3cc97636500"><div class="ttname"><a href="server__init_8c.html#aa9bc3ff8e7f409540f85b3cc97636500">set_clifd</a></div><div class="ttdeci">int set_clifd(int clisock, int epollfd, struct epoll_event *ev)</div><div class="ttdef"><b>Definition:</b> <a href="server__init_8c_source.html#l00018">server_init.c:18</a></div></div>
<div class="ttc" id="structt__serv_html"><div class="ttname"><a href="structt__serv.html">t_serv</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00085">server.h:85</a></div></div>
<div class="ttc" id="server_8h_html_aeefbbafa97642defe3ee6c3080b7d66f"><div class="ttname"><a href="server_8h.html#aeefbbafa97642defe3ee6c3080b7d66f">BACKLOG</a></div><div class="ttdeci">#define BACKLOG</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00020">server.h:20</a></div></div>
<div class="ttc" id="structt__serv_html_aa95442079d9e7a2294ad8df1335ae0f4"><div class="ttname"><a href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">t_serv::ev</a></div><div class="ttdeci">struct epoll_event ev</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00097">server.h:97</a></div></div>
<div class="ttc" id="structt__serv_html_a018d976aed4b9930a794da25a758a024"><div class="ttname"><a href="structt__serv.html#a018d976aed4b9930a794da25a758a024">t_serv::rp</a></div><div class="ttdeci">adrinf * rp</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00094">server.h:94</a></div></div>
<div class="ttc" id="server__init_8c_html_a381b88f843ed1ebdaa5b2a8ded74931b"><div class="ttname"><a href="server__init_8c.html#a381b88f843ed1ebdaa5b2a8ded74931b">prevent_reused</a></div><div class="ttdeci">static void prevent_reused(int sockfd)</div><div class="ttdef"><b>Definition:</b> <a href="server__init_8c_source.html#l00082">server_init.c:82</a></div></div>
<div class="ttc" id="server__init_8c_html_a1f61d16ccfab82b21ca40ce23feb7c02"><div class="ttname"><a href="server__init_8c.html#a1f61d16ccfab82b21ca40ce23feb7c02">set_sockfd</a></div><div class="ttdeci">int set_sockfd(t_serv *all)</div><div class="ttdef"><b>Definition:</b> <a href="server__init_8c_source.html#l00100">server_init.c:100</a></div></div>
<div class="ttc" id="structt__serv_html_ae8783e38ef0c183366703267ca7b3298"><div class="ttname"><a href="structt__serv.html#ae8783e38ef0c183366703267ca7b3298">t_serv::res</a></div><div class="ttdeci">adrinf * res</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00095">server.h:95</a></div></div>
<div class="ttc" id="server__init_8c_html_a3802a71fa34e93cb1d85f919914f5abf"><div class="ttname"><a href="server__init_8c.html#a3802a71fa34e93cb1d85f919914f5abf">set_iface</a></div><div class="ttdeci">int set_iface(adrinf *hints, adrinf **res, const char *port)</div><div class="ttdef"><b>Definition:</b> <a href="server__init_8c_source.html#l00034">server_init.c:34</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
